package com.xxx.common.dto;

import com.xxx.common.Const;

import lombok.Data;

@Data
public class Pagination {
	
	private int currentPage;
	
	private int page;
	
	private int pageSize  = Const.PAGE_SIZE;
	
	private String order = "createtime desc";

	public Pagination(int currentPage) {
		super();
		this.currentPage = currentPage;
		this.page = (currentPage - 1) * pageSize;
	}
	
	public Pagination(int currentPage,String order) {
		super();
		this.currentPage = currentPage;
		this.page = (currentPage - 1) * pageSize;
		this.order = order;
	}

	public Pagination(int currentPage, int pageSize) {
		super();
		this.currentPage = currentPage;
		this.page = (currentPage - 1) * pageSize;
		this.pageSize = pageSize;
	}
	
	public Pagination(int currentPage, int pageSize,String order) {
		super();
		this.currentPage = currentPage;
		this.page = (currentPage - 1) * pageSize;
		this.pageSize = pageSize;
		this.order = order;
	}

}
